package top.wineye.spring.dependency.inject;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import top.wineye.spring.dependency.pojo.BizHolder;

public class XmlDependencyInjectBySetter {
    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory =
                new DefaultListableBeanFactory();
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
        reader.loadBeanDefinitions("setter-inject-bean-factory-context.xml");

        BizHolder bean = beanFactory.getBean(BizHolder.class);
        System.out.println(bean);
    }
}
